function OrgController(){
    var service=new Object();
    service.url=host+"/environment-protection"+"/org";
    /**
      *加载下级组织列表 
      *@param parentId  父组织Id,传入-1,获取根组织阶段 
      */
     service.getChildren=function(parentId,onSuccess){
	     var parentIdStr=parentId;
		 var requestUrl=this.url+"/children";
         $.ajax({
             url:requestUrl,
             type:'Get',
             data:{
                   parentId:parentIdStr,
             },
             cache:false,
             success:onSuccess,
             error:common.onError
             });
    };
           
    /**
      *查询所有的组织 
      */
     service.getAllOrg=function(onSuccess){
		 var requestUrl=this.url+"/list/all";
         $.ajax({
             url:requestUrl,
             type:'Get',
             data:{
             },
             cache:false,
             success:onSuccess,
             error:common.onError
             });
    };
           
    return service;
}
